load("@rules_cc//cc:cc_library.bzl", "cc_library")

cc_library(
    name = "glib",
    hdrs = ["glib.h"],
    visibility = ["//visibility:public"],
    deps = [
        "//:hiredis",
        "@glib//glib",
    ],
)

cc_library(
    name = "libevent",
    hdrs = ["libevent.h"],
    visibility = ["//visibility:public"],
    deps = [
        "//:hiredis",
        "@libevent//:event",
    ],
)

cc_library(
    name = "libuv",
    hdrs = ["libuv.h"],
    visibility = ["//visibility:public"],
    deps = [
        "//:hiredis",
        "@libuv",
    ],
)

cc_library(
    name = "macosx",
    hdrs = ["macosx.h"],
    target_compatible_with = ["@platforms//os:macos"],
    visibility = ["//visibility:public"],
    deps = ["//:hiredis"],
)

cc_library(
    name = "poll",
    hdrs = ["poll.h"],
    target_compatible_with = select({
        "@platforms//os:windows": ["@platforms//:incompatible"],
        "//conditions:default": [],
    }),
    visibility = ["//visibility:public"],
    deps = ["//:hiredis"],
)
